package com.li.controller;

import com.li.config.RabbitmqConfig;
import com.li.service.MessageService;
import com.li.utils.Person;
import com.li.utils.Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/message")
public class MessageController {
    @Autowired
    private MessageService messageService;

    /**
     * 发送消息
     */
    @RequestMapping("/send")
    @ResponseBody
    public List<Person> sendMessage(@RequestParam(required = true) String message) {
       // messageService.sendMessage(RabbitmqConfig.amqDirectExchange, RabbitmqConfig.businessRoutingKey, message);
        return Utils.personOrder();
    }


}
